The present invention relates to a method and apparatus for up-interpolating a Bayer image.
The invention has been developed primarily for a digital camera including an integral printer for providing a paper print of an image captured by the camera and will be described hereinafter with reference to that application. However, it will be appreciated that the invention is not limited to that particular field of use.
According to a first aspect of the invention there is provided a method for interpolating a Bayer image of red, green and blue pixels from an input space to an output space, the method including the steps of:
receiving the Bayer image; and
mapping each of the colors to the output space in accordance with the following:             x      xe2x80x2        =                  (                  x          mps                )            +              k        1                        y      xe2x80x2        =                  (                  y          mps                )            +              k        2            
where:
x,y is the coordinate in the output space,
xxe2x80x2yxe2x80x2 is the coordinate in the input space;
mps is the number of pixels in the output space per input space sample, and
k1,2 are either 0 or xe2x88x920.5 depending on the color and the desired relative rotational orientation of the image.
Preferably, for the green pixels in the input space, each ordinate of the input space is multiplied by 1/2. More preferably, for the green pixels in the input space, each coordinate of the input space is multiplied by 1/2.
According to a second aspect of the invention there is provided an apparatus for interpolating a Bayer image of red, green and blue pixels from an input space to an output space, the method including the steps of:
receiving the Bayer image; and
mapping each of the colors to the output space in accordance with the following:             x      xe2x80x2        =                  (                  x          mps                )            +              k        1                        y      xe2x80x2        =                  (                  y          mps                )            +              k        2            
where:
x,y is the coordinate in the output space,
xxe2x80x2yxe2x80x2 is the coordinate in the input space;
mps is the number of pixels in the output space per input space sample, and
k1,2 are either 0 or xe2x88x920.5 depending on the color and the desired relative rotational orientation of the image.
Preferably, for the green pixels in the input space, each ordinate of the input space is multiplied by 1/2. More preferably, for the green pixels in the input space, each coordinate of the input space is multiplied by 1/2.